
install(FILES ${PROJECT_ROOT}/setup/PersonCounter.ini DESTINATION .)
install(FILES ${PROJECT_ROOT}/setup/CrashReport.bat DESTINATION .)

install(FILES ${PROJECT_ROOT}/doc/人流统计服务配置部署.docx DESTINATION doc)


if(WIN32)
	install(DIRECTORY ${PROJECT_ROOT}/HCNetSDK/lib/ DESTINATION .)
	install(FILES ${PROJECT_ROOT}/third_party/sqlite/bin/sqlite3.dll DESTINATION .)
else()
		
endif()

set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
#include(InstallRequiredSystemLibraries)

#set(CPACK_PACKAGE_DIRECTORY ${PROJECT_ROOT})
set(CPACK_PACKAGE_NAME "PersonCounter")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Person Counter")
set(CPACK_PACKAGE_VENDOR "www.100wits.com")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "0")

if(UNIX)
	SET(CPACK_GENERATOR "TGZ")
else()
	SET(CPACK_GENERATOR "ZIP")
endif()

set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/dist")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") 

include(CPack)